#ifndef _FNT_DIALOG_H_
#define _FNT_DIALOG_H_

#include <QDialog>
#include <array>
class Point;
class QSlider;
class QSpinBox;
class QDoubleSpinBox;
class QDialogButtonBox;
class QLineEdit;

class PositionDialog : public QDialog {
	std::array<double, 6> _bbox;
	std::array<QSlider*, 3> sliders;
	std::array<QDoubleSpinBox*, 3> spinBoxes;
	void sliderChanged(int i, int value);
	void spinBoxChanged(int i, double d);
	public:
	static bool getPosition(Point* pos, const std::array<double, 6>& bbox, QWidget* par);
	PositionDialog(Point* pos, const std::array<double, 6>& bbox, QWidget* par);
};

class LoginInfoDialog : public QDialog {
	QLineEdit* lineUsr;
	QLineEdit* linePwd;
	public:
	static bool getLoginInfo(QString* usr, QString* pwd, const QUrl& url);
	LoginInfoDialog(const QUrl& url, QWidget* par=0);
};

class AboutDlg: public QDialog {
	public:
		AboutDlg(QWidget* par);
		~AboutDlg();
};

class CreateSessionDialog : public QDialog {
	Q_OBJECT;
	QLineEdit* lineLoc;
	QLineEdit* spinP0[3];
	QLineEdit* spinDir[9];
	CreateSessionDialog(QWidget* par, const QString& loc, const std::array<double, 3>& p0, const std::array<double, 9>& dir);
	~CreateSessionDialog();

	private Q_SLOTS:
		void openFileClicked();
	void createClicked();
	void cancelClicked();
	public:
	static bool getLocation(QWidget* par, QString* loc, std::array<double, 3>* p0, std::array<double, 9>* dir);
};

#endif
